Ext.define('MyApp.controller.systeminfo.SystemInfoController', {
	extend : 'MyApp.controller.share.BaseGridController',
	views : ['systeminfo.SystemInfoView','systeminfo.SystemInfoForm'],
	stores : ['SystemInfoStore'],
	models : ['SystemInfoEntity'],
	requires : ['Ext.ux.ProgressBarPager'],
	refs : [
			{ ref: 'systeminfoview', selector: 'systeminfoview' }
	],
	init : function() {
		this.control({
			'systeminfoview': {
				select: function(){
					this.onGridSelect(this.getSysteminfoview());
				},
				deselect: function(){
					this.onGridDSelect(this.getSysteminfoview());
				}
			},
			'systeminfoview button#add':{
				click:function(btn){
					this.onAddButtonClick('systemInfoForm');
				}
			},
			'systeminfoview button#edit':{
				click:function(btn){
					this.onEditButtonClick(btn,'systeminfoview','systemInfoForm');
				}
			},
			'systemInfoForm button#save':{
				click:function(btn){
					var me = this;
	        		me.onSaveButtonClick(btn,me.getSystemInfoStoreStore(),me.getSystemInfoEntityModel());
				}
			},
	        'systemInfoForm button#cancel':{
	        	click:'onCancelButtonClick'
	        }
		});
	}
});